import Vue from 'vue';
import VueRouter from 'vue-router';

//导入需要的组件
import Login from '../pages/Login/Login'
import index from '../com/components/index'
import book from '../pages/book/book'
import book_list from '../pages/book/book_list'
Vue.use(VueRouter)

const routes=new VueRouter({

    routes:[
        //重定向路由
        {path:'/',redirect:'/index' },
        //登录的路由
        {path: '/login', component:Login},
        {path:'/index', component:index},
        //图书详情页
        {path:'/book',component:book},
        //分类图书列表
        {path:'/book_list', component:book_list}
    ]
});

export default routes